broadcast api to use samsung product api, <script type="text/javascript" src="$webapis/webapis/webapis js"></script> should be loaded in index html the module defines the product's broadcast functionalities of that are provided in the tizen samsung product api user can control the information that is related to the broadcast functionalities since 6 5 product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast summary of interfaces and methods interface method broadcastmanagerobject audioinfo directtuneoption subtitleinfo broadcastmanager domstring getversion ;void enabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ;void disabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ;audioinfo [] gettotalaudioinfo ;audioinfo getcurrentaudioinfo ;void setcurrentaudio long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ;subtitleinfo [] gettotalsubtitleinfo ;subtitleinfo getcurrentsubtitle ;void setcurrentsubtitleindex long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ;void sethoteldrmforensicdata domstring forensicdata, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ;void tunedirect directtuneoption tuneoption, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ;void clearrating broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; broadcastsuccesscallback void onsuccess broadcastresult data ; broadcasterrorcallback void onerror broadcasterror data ; 1 type definitions 1 1 eaudiotype audio type enum value of the referenced program element enum eaudiotype { "invalid", "undefined", "clean_effect", "hearing_impaired", "visual_impaired" }; the following values are supported invalid type is invalid undefined type is undefined clean_effect this type indicates that the referenced program element has no language hearing_impaired this type indicates that the referenced program element is prepared for the hearing impaired visual_impaired this type indicates that the referenced program element is prepared for the visually impaired viewer 1 2 echanneltype channel type enum value for direct tune this value is mandatory enum echanneltype { "atv", "dtv", "catv", "cdtv", "sdtv" }; the following values are supported atv channel type of air analog dtv channel type of air digital catv channel type of cable analog cdtv channel type of cable digital sdtv channel type of satellite dvb only 1 3 ebroadcaststandard broadcast standard enum value for direct tune if there is no input value for the parameter, use the current broadcast standard of the tv enum ebroadcaststandard { "atsc", "dvb", "isdb" }; the following values are supported atsc broadcaststandard of atsc dvb broadcaststandard of dvb isdb broadcaststandard of isdb 1 4 epolarisationtype polarisation type enum value for direct tune if there is no input value for the parameter, use the default polarisation type for the tv enum epolarisationtype { "unknown", "pol_hl", "pol_vr" }; the following values are supported unknown unknown polarisation pol_hl polarisation for the upper band pol_vr polarisation for the low vertical band 1 5 ehotelprogramtype hotel program type enum value for inserting a channel if there is no input value for the parameter, use the normal value enum ehotelprogramtype { "normal", "protected", "info", "radio", "delete" }; the following values are supported normal normal channel protected hidden channel info channel for information radio video muted channel delete deleted channel 1 6 esubtitlemode subtitle mode enum value, either normal or hearing impaired enum esubtitlemode { "normal", "hearing_impaired" }; the following values are supported normal subtitle normal mode hearing_impaired subtitle hearing impaired mode 1 7 ecolorsystem color system enum value for direct tune if there is no input value for the parameter, use auto enum ecolorsystem { "auto", "pal", "secam", "ntsc4_43", "ntsc3_58", "pal_m", "pal_n" }; the following values are supported auto color system auto pal color system pal secam color system secam ntsc4_43 color system ntsc4 43 ntsc3_58 color system ntsc3 58 pal_m for brazil pal_n for brazil 1 8 esatelliteid satellite id enum value for direct tune enum esatelliteid { "astra_19_2e", "astra_23_5e", "astra_28_2e", "astra_31_5e", "astra_4_8e", "eutelsat_10e", "eutelsat_16e", "eutelsat_21_5e", "eutelsat_25_5e", "eutelsat_28_5e", "eutelsat_33e", "eutelsat_36e", "eutelsat_3e", "eutelsat_70_5e", "eutelsat_70e", "eutelsat_7e", "eutelsat_8_west_c", "eutelsat_9e", "eutelsat12_westa", "eutelsat5_westa", "eutelsat7_westa", "eutelsat8_westa", "eutelsatw1_10e", "eutelsatw2_16e", "eutelsatw3a_7e", "eutelsatw4_w7_36e", "eutelsatw5_70_5e", "eutelsatw6_21_5e", "abs_2_75e", "abs_7", "afghansat_1", "amazonas_61w", "amos_4w", "apstar", "arabsat_30_5e", "arabsat_5c_20e", "asiasat_5", "asiasat_7", "atlanticbird_5w", "atlanticbird1_12_5w", "atlanticbird2_8w", "azerspace_1_africasat_1a", "badr_26e", "bonum1_56e", "eurobird_25_5e", "eurobird_28_5e", "eurobird_33e", "eurobird_4e", "eurobird_9e", "express_am22", "express_am44", "express_am5_140e", "express_at1_56e", "expressa4_14w", "expressam1_40e", "hellas_39e", "hispasat_30w", "hotbird_13e", "insat_4b_93_3e", "intelsat_10", "intelsat_45e", "intelsat_902", "intelsat_904_60e", "intelsat15_85_2e", "intelsat1r_45w", "intelsat3r_43w", "intelsat7_10_68_5e", "intelsat705_50w", "intelsat707_53w", "intelsat801_31_5w", "intelsat805_55_5w", "intelsat9_58w", "intelsat901_18w", "intelsat903_34_5w", "intelsat905_24_5w", "intelsat907_27_5w", "measat_3b_91_5e", "nilesat_102_7w", "nilesat_201_7w", "nilesat_7w", "nss_6_ses_8_95e", "nss12_57e", "nss7_22w", "nss806_40_5w", "optus_d1_160e", "paksat_38e", "ses_5", "ses_7_108_2e", "sesat_53e", "st_2", "telstar_11n_37_5w", "telstar12_15w", "thaicom", "thor_intelsat_0_8w", "turksat_31_3e", "turksat_42e", "yahsat_1a", "yamal_202", "yamal201_90e", "user1", "user2", "user3", "user4" }; the following values are supported astra_19_2e satellite id for astra_19_2e astra_23_5e satellite id for astra_23_5e astra_28_2e satellite id for astra_28_2e astra_31_5e satellite id for astra_31_5e astra_4_8e satellite id for astra_4_8e eutelsat_10e satellite id for eutelsat_10e eutelsat_16e satellite id for eutelsat_16e eutelsat_21_5e satellite id for eutelsat_21_5e eutelsat_25_5e satellite id for eutelsat_25_5e eutelsat_28_5e satellite id for eutelsat_28_5e eutelsat_33e satellite id for eutelsat_33e eutelsat_36e satellite id for eutelsat_36e eutelsat_3e satellite id for eutelsat_3e eutelsat_70_5e satellite id for eutelsat_70_5e eutelsat_70e satellite id for eutelsat_70e eutelsat_7e satellite id for eutelsat_7e eutelsat_8_west_c satellite id for eutelsat_8_west_c eutelsat_9e satellite id for eutelsat_9e eutelsat12_westa satellite id for eutelsat12_westa eutelsat5_westa satellite id for eutelsat5_westa eutelsat7_westa satellite id for eutelsat7_westa eutelsat8_westa satellite id for eutelsat8_westa eutelsatw1_10e satellite id for eutelsatw1_10e eutelsatw2_16e satellite id for eutelsatw2_16e eutelsatw3a_7e satellite id for eutelsatw3a_7e eutelsatw4_w7_36e satellite id for eutelsatw4_w7_36e eutelsatw5_70_5e satellite id for eutelsatw5_70_5e eutelsatw6_21_5e satellite id for eutelsatw6_21_5e abs_2_75e satellite id for abs_2_75e abs_7 satellite id for abs_7 afghansat_1 satellite id for afghansat_1 amazonas_61w satellite id for amazonas_61w amos_4w satellite id for amos_4w apstar satellite id for apstar arabsat_30_5e satellite id for arabsat_30_5e arabsat_5c_20e satellite id for arabsat_5c_20e asiasat_5 satellite id for asiasat_5 asiasat_7 satellite id for asiasat_7 atlanticbird_5w satellite id for atlanticbird_5w atlanticbird1_12_5w satellite id for atlanticbird1_12_5w atlanticbird2_8w satellite id for atlanticbird2_8w azerspace_1_africasat_1a satellite id for azerspace_1_africasat_1a badr_26e satellite id for badr_26e bonum1_56e satellite id for bonum1_56e eurobird_25_5e satellite id for eurobird_25_5e eurobird_28_5e satellite id for eurobird_28_5e eurobird_33e satellite id for eurobird_33e eurobird_4e satellite id for eurobird_4e eurobird_9e satellite id for eurobird_9e express_am22 satellite id for express_am22 express_am44 satellite id for express_am44 express_am5_140e satellite id for express_am5_140e express_at1_56e satellite id for express_at1_56e expressa4_14w satellite id for expressa4_14w expressam1_40e satellite id for expressam1_40e hellas_39e satellite id for hellas_39e hispasat_30w satellite id for hispasat_30w hotbird_13e satellite id for hotbird_13e insat_4b_93_3e satellite id for insat_4b_93_3e intelsat_10 satellite id for intelsat_10 intelsat_45e satellite id for intelsat_45e intelsat_902 satellite id for intelsat_902 intelsat_904_60e satellite id for intelsat_904_60e intelsat15_85_2e satellite id for intelsat15_85_2e intelsat1r_45w satellite id for intelsat1r_45w intelsat3r_43w satellite id for intelsat3r_43w intelsat7_10_68_5e satellite id for intelsat7_10_68_5e intelsat705_50w satellite id for intelsat705_50w intelsat707_53w satellite id for intelsat707_53w intelsat801_31_5w satellite id for intelsat801_31_5w intelsat805_55_5w satellite id for intelsat805_55_5w intelsat9_58w satellite id for intelsat9_58w intelsat901_18w satellite id for intelsat901_18w intelsat903_34_5w satellite id for intelsat903_34_5w intelsat905_24_5w satellite id for intelsat905_24_5w intelsat907_27_5w satellite id for intelsat907_27_5w measat_3b_91_5e satellite id for measat_3b_91_5e nilesat_102_7w satellite id for nilesat_102_7w nilesat_201_7w satellite id for nilesat_201_7w nilesat_7w satellite id for nilesat_7w nss_6_ses_8_95e satellite id for nss_6_ses_8_95e nss12_57e satellite id for nss12_57e nss7_22w satellite id for nss7_22w nss806_40_5w satellite id for nss806_40_5w optus_d1_160e satellite id for optus_d1_160e paksat_38e satellite id for paksat_38e ses_5 satellite id for ses_5 ses_7_108_2e satellite id for ses_7_108_2e sesat_53e satellite id for sesat_53e st_2 satellite id for st_2 telstar_11n_37_5w satellite id for telstar_11n_37_5w telstar12_15w satellite id for telstar12_15w thaicom satellite id for thaicom thor_intelsat_0_8w satellite id for thor_intelsat_0_8w turksat_31_3e satellite id for turksat_31_3e turksat_42e satellite id for turksat_42e yahsat_1a satellite id for yahsat_1a yamal_202 satellite id for yamal_202 yamal201_90e satellite id for yamal201_90e user1 satellite id for user1 user2 satellite id for user2 user3 satellite id for user3 user4 satellite id for user4 1 9 broadcastresult stores the results and information of the successful callbacks dictionary broadcastresult { domstring result; domstring data; }; the following values are supported result result of the successful callback data saved data of the callback result 1 10 broadcasterror this value is the error of the callback function dictionary broadcasterror { long code; domstring name; domstring message; }; the following values are supported code error code name error name message error message 2 interfaces 2 1 broadcastmanagerobject the interface defines what is instantiated by the broadcast object of the tizen samsung product api there will be a webapis broadcast object that allows access to the functionality of the broadcast api [nointerfaceobject] interface broadcastmanagerobject { readonly attribute broadcastmanager broadcast; }; webapis implements broadcastmanagerobject; since 6 5 attributes readonly broadcastmanager broadcast namespace for the broadcast api since 6 5 2 2 audioinfo this interface defines the current audio information [nointerfaceobject] interface audioinfo { readonly attribute domstring language; readonly attribute long index; readonly attribute eaudiotype type; }; attributes readonly domstring language this attribute contains information on the current audio status, it is empty when there is a subtitle descriptor but no language information since 6 5 readonly long index audio index since 6 5 readonly eaudiotype type this attribute is information of the current audio status since 6 5 2 3 directtuneoption tune parameters for direct tune, refer to the example description of tunedirect to see which values are mandatory [nointerfaceobject] interface directtuneoption { readonly attribute ebroadcaststandard broadcaststandard; readonly attribute echanneltype channeltype; readonly attribute long major; readonly attribute long minor; readonly attribute long frequency; readonly attribute emodulationtype modulationtype; readonly attribute long ptc; readonly attribute long symbolrate; readonly attribute ebandwidth bandwidth; readonly attribute long programnumber; readonly attribute ecolorsystem? colorsystem; readonly attribute esatelliteid? satelliteid; readonly attribute epolarisationtype? polarization; readonly attribute domstring? channelname; readonly attribute ehotelprogramtype? hotelprogramtype; }; attributes readonly ebroadcaststandard broadcaststandard broadcast spec for tuning readonly echanneltype channeltype channel for tuning readonly long major major number for tuning mandatory for atsc, isdb digital channel readonly long minor minor number for tuning, if there is no value for the digital channel, it sets as '1' optional, mandatory for the atsc and isdb digital channels readonly long frequency frequency for tuning khz mandatory for dvb analog channel, dvb air digital, dvb cable digital, dvb satellite readonly emodulationtype modulationtype modulation type for tuning mandatory for dvb air digital channel, dvb cable digital readonly long ptc ptc for tuning the atsc channel when the cdtv channel case in usa, the ptc value is converted to the std frequency spec readonly long symbolrate symbol rate for tuning the dvb channel mandatory for the dvb cable digital channel readonly ebandwidth bandwidth bandwidth for tuning the dvb channel mandatory for the dvb cable digital channel readonly long programnumber program number for tuning the dvb channel, programnumber is service id mandatory for dvb satellite channel, dvb air digital, dvb cable digital readonly ecolorsystem colorsystem [nullable] color system for tuning the dvb analog channel readonly esatelliteid satelliteid [nullable] satellite id for tuning the dvb satellite channel mandatory for the dvb satellite channel readonly epolarisationtype polarization [nullable] polarization for tuning the dvb satellite channel readonly domstring channelname [nullable] channel name when inserting the dvb analog channel readonly ehotelprogramtype hotelprogramtype [nullable] hotel program type when inserting a channel 2 4 subtitleinfo subtitle information that has language and index [nointerfaceobject] interface subtitleinfo { readonly attribute domstring language; readonly attribute long index; readonly attribute esubtitlemode mode; }; attributes readonly domstring language subtitle langauge, the value is empty string when there is a subtitle descriptor but no language information readonly long index subtitle index readonly esubtitlemode mode subtitle mode 2 5 broadcastmanager this interface provides methods to use the broadcast functionalities [nointerfaceobject] interface broadcastmanager { domstring getversion ; void enabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void disabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; audioinfo [] gettotalaudioinfo ; audioinfo getcurrentaudioinfo ; void setcurrentaudio long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; subtitleinfo [] gettotalsubtitleinfo ; subtitleinfo getcurrentsubtitle ; void setcurrentsubtitleindex long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void sethoteldrmforensicdata domstring forensicdata, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void tunedirect directtuneoption tuneoption, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void clearrating broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; }; since 6 5 methods getversion this interface provides methods to get the broadcast module's version domstring getversion ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast return value domstring version of broadcast module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror in any other error case since 6 5 code example var version = null; try { version = webapis broadcast getversion ; } catch e { console log "[getversion] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } if null !== version { console log "[getversion] call syncfunction type " + version ; } enabledataservice enable broadcast data service broadcast data service provides support for subtitles/captions and other broadcast functionalities this method should be called at the beginning of the web application void enabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast parameters onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if any input parameter is not compatible with the expected type for that parameter since 6 5 code example var onsuccess = function val { console log "[enabledataservice] success " + val result ; }; var onerror = function error { console log "[enabledataservice] code " + error code + " error name " + error name + " message " + error message ; }; console log "[enabledataservice]" ; webapis broadcast enabledataservice onsuccess, onerror ; disabledataservice disable broadcast data service this method should be called before the web application finishes void disabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast parameters onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if any input parameter is not compatible with the expected type for that parameter since 6 5 code example var onsuccess = function val { console log "[disabledataservice] success " + val result ; }; var onerror = function error { console log "[disabledataservice] code " + error code + " error name " + error name + " message " + error message ; }; console log "[disabledataservice]" ; webapis broadcast disabledataservice onsuccess, onerror ; gettotalaudioinfo this interface provides methods to get the total audio information audioinfo [] gettotalaudioinfo ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast return value audioinfo [] multi information of audio exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror in any other error case since 6 5 code example var i, audioinformation; audioinformation = webapis broadcast gettotalaudioinfo ; for i =0; i < audioinformation length; i++ { console log "[gettotalaudioinfo] language " + audioinformation[i] language ; console log "[gettotalaudioinfo] index " + audioinformation[i] index ; console log "[gettotalaudioinfo] type " + audioinformation[i] type ; } getcurrentaudioinfo this interface provides methods to get the current audio information audioinfo getcurrentaudioinfo ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast return value audioinfo current information of audio exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror in any other error case since 6 5 code example var audioinformation; audioinformation = webapis broadcast getcurrentaudioinfo ; console log "[getcurrentaudioinfo] language " + audioinformation language ; console log "[getcurrentaudioinfo] index " + audioinformation index ; console log "[getcurrentaudioinfo] type " + audioinformation type ; setcurrentaudio this interface provides methods to set the current audio information void setcurrentaudio long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv constraint n/a privilege level partner privilege http //developer samsung com/privilege/broadcast parameters index current audio index, with a range from 0 to length-1 of gettotalaudioinfo onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with the error type typemismatcherror if invalid values are passed for an input parameter code example var onsuccess = function val { console log "[setcurrentaudio] success " + val result ; }; var onerror = function error { console log "[setcurrentaudio] code " + error code + " error name " + error name + " message " + error message ; }; console log "[setcurrentaudio]" ; webapis broadcast setcurrentaudio 0, onsuccess, onerror ; gettotalsubtitleinfo this interface provides methods to get the total subtitle information subtitleinfo [] gettotalsubtitleinfo ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast return value subtitleinfo [] multi information of subtitle exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror in any other error case since 6 5 code example var i, subtitleinformation; subtitleinformation = webapis broadcast gettotalsubtitleinfo ; for i =0; i < subtitleinformation length; i++ { console log "[gettotalsubtitleinfo] language " + subtitleinformation[i] language ; console log "[gettotalsubtitleinfo] index " + subtitleinformation[i] index ; console log "[gettotalsubtitleinfo] mode " + subtitleinformation[i] mode ; } getcurrentsubtitle this interface provides methods to get the current subtitle information subtitleinfo getcurrentsubtitle ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast return value subtitleinfo current information of subtitle exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type unknownerror in any other error case since 6 5 code example var subtitleinformation; subtitleinformation = webapis broadcast getcurrentsubtitle ; console log "[getcurrentsubtitle] language " + subtitleinformation language ; console log "[getcurrentsubtitle] index " + subtitleinformation index ; console log "[getcurrentsubtitle] mode " + subtitleinformation mode ; setcurrentsubtitleindex this interface provides methods to change the current displayed subtitle language with the index value of subtitle void setcurrentsubtitleindex long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast parameters index long, index starts from 0 to length-1 of gettotalsubtitleinfo onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with the error type typemismatcherror if invalid values are passed for an input parameter since 6 5 code example var onsuccess = function val { console log "[setcurrentsubtitleindex] success " + val result ; }; var onerror = function error { console log "[setcurrentsubtitleindex] code " + error code + " error name " + error name + " message " + error message ; }; console log "[setcurrentsubtitleindex]" ; webapis broadcast setcurrentsubtitleindex 0, onsuccess, onerror ; sethoteldrmforensicdata this interface provides methods to set the forensic data for security by watermark void sethoteldrmforensicdata domstring forensicdata, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast parameters forensicdata string data of the forensic info onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with the error type typemismatcherror if invalid values are passed for an input parameter since 6 5 code example var onsuccess = function val { console log "[sethoteldrmforensicdata] success " + val result ; }; var onerror = function error { console log "[sethoteldrmforensicdata] code " + error code + " error name " + error name + " message " + error message ; }; console log "[hoteldrmforensicdata]" ; webapis broadcast sethoteldrmforensicdata "abcdefghij", onsuccess, onerror ; tunedirect direct tuning an rf channel whether stored in the channel map or not void tunedirect directtuneoption tuneoption, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast parameters tuneoption tuning option mandatory for all cases broadcaststandard, channeltype mandatory for atsc, isdb analog channel ptc or frequency mandatory for atsc, isdb digital channel ptc frequency + major + minor or ptc frequency + program mandatory for dvb analog channel frequency mandatory for dvb air digital channel frequency, programnumber, modulationtype, bandwidth mandatory for dvb cable digital channel frequency, programnumber, modulationtype, bandwidth, symbolrate mandatory for dvb satellite channel frequency, programnumber, satelliteid onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with the error type typemismatcherror if invalid values are passed for an input parameter since 6 5 code example var onsuccess = function val { console log "[tunedirect] success " + val result ; }; var onerror = function error { console log "[tunedirect] code " + error code + " error name " + error name + " message " + error message ; }; console log "[tunedirect] example 1" ; var tuneoptionatsc = {}; tuneoptionatsc broadcaststandard = "atsc"; tuneoptionatsc channeltype = "cdtv"; tuneoptionatsc ptc = 18; tuneoptionatsc major = 28; tuneoptionatsc minor = 1; tuneoptionatsc modulationtype = "qam256"; webapis broadcast tunedirect tuneoptionatsc,onsuccess, onerror ; console log "[tunedirect] example 2" ; var tuneoptiondvbanalog = {}; tuneoptiondvbanalog broadcaststandard = "dvb"; tuneoptiondvbanalog channeltype = "atv"; tuneoptiondvbanalog frequency = 63752; tuneoptiondvbanalog modulationtype = "pal"; tuneoptiondvbanalog soundsystem = "auto"; tuneoptiondvbanalog colorsystem = "auto"; webapis broadcast tunedirect tuneoptiondvbanalog,onsuccess, onerror ; console log "[tunedirect] example 3" ; var tuneoptiondvbdigitalair = {}; tuneoptiondvbdigitalair broadcaststandard = "dvb"; tuneoptiondvbdigitalair channeltype = "dtv"; tuneoptiondvbdigitalair frequency = 474000; tuneoptiondvbdigitalair modulationtype = "8psk"; tuneoptiondvbdigitalair bandwidth = "8mhz"; tuneoptiondvbdigitalair major = 4; tuneoptiondvbdigitalair programnumber = 5; webapis broadcast tunedirect tuneoptiondvbdigitalair,onsuccess, onerror ; console log "[tunedirect] example 4" ; var tuneoptiondvbdigitalcable = {}; tuneoptiondvbdigitalcable broadcaststandard = "dvb"; tuneoptiondvbdigitalcable channeltype = "cdtv"; tuneoptiondvbdigitalcable frequency = 314000; tuneoptiondvbdigitalcable modulationtype = "qam256"; tuneoptiondvbdigitalcable bandwidth = "8mhz"; tuneoptiondvbdigitalcable symbolrate = 6900; tuneoptiondvbdigitalair programnumber = 2501; webapis broadcast tunedirect tuneoptiondvbdigitalcable,onsuccess, onerror ; console log "[tunedirect] example 5" ; var tuneoptiondvbsatellite = {}; tuneoptiondvbsatellite broadcaststandard = "dvb"; tuneoptiondvbsatellite channeltype = "sdtv"; tuneoptiondvbsatellite frequency = 10758000; tuneoptiondvbsatellite bandwidth = "8mhz"; tuneoptiondvbsatellite satelliteid = "astra_19_2e"; tuneoptiondvbsatellite programnumber = 7296; webapis broadcast tunedirect tuneoptiondvbsatellite,onsuccess, onerror ; console log "[tunedirect] example 6-1, ptc+program number case for atsc, ptc 18 = frequency 497mhz" ; var tuneoptionatscmulti1 = {}; tuneoptionatscmulti1 broadcaststandard = "atsc"; tuneoptionatscmulti1 channeltype = "dtv"; tuneoptionatscmulti1 ptc = 18; tuneoptionatscmulti1 programnumber = 2; tuneoptionatscmulti1 modulationtype = "vsb8"; webapis broadcast tunedirect tuneoptionatscmulti1,onsuccess, onerror ; console log "[tunedirect] example 6-2, ptc+major+minor case for atsc, ptc 18 = frequency 497mhz" ; var tuneoptionatscmulti2 = {}; tuneoptionatscmulti2 broadcaststandard = "atsc"; tuneoptionatscmulti2 channeltype = "dtv"; tuneoptionatscmulti2 frequency = 497000; tuneoptionatscmulti2 major = 28; tuneoptionatscmulti2 minor = 2; tuneoptionatscmulti2 modulationtype = "vsb8"; webapis broadcast tunedirect tuneoptionatscmulti2,onsuccess, onerror ; clearrating password initialization and setting off processing are performed in the rating menu setting of the hotel product void clearrating broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; product b2b htv privilege level partner privilege http //developer samsung com/privilege/broadcast parameters onsuccess callback method to be invoked when this api is successful onerror [optional][nullable] callback method to be invoked when an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if any input parameter is not compatible with the expected type for that parameter since 6 5 code example var onsuccess = function val { console log "[clearrating] success " + val result ; }; var onerror = function error { console log "[clearrating] code " + error code + " error name " + error name + " message " + error message ; }; console log "[clearrating]" ; webapis broadcast clearrating onsuccess, onerror ; 2 6 broadcastsuccesscallback this callback interface defines the b2b set information success callback [callback = functiononly, nointerfaceobject] interface broadcastsuccesscallback { void onsuccess broadcastresult data ; }; methods onsuccess callback parameter void onsuccess broadcastresult data ; privilege level partner privilege http //developer samsung com/privilege/broadcast parameters data status of the operation since 6 5 code example var onsuccess = function val { console log "[setcurrentaudio] success " + val result ; }; var onerror = function error { console log "[setcurrentaudio] code " + error code + " error name " + error name + " message " + error message ; }; console log "[setcurrentaudio]" ; webapis broadcast setcurrentaudio 0, onsuccess, onerror ; 2 7 broadcasterrorcallback this callback interface defines the b2b set information error callback [callback = functiononly, nointerfaceobject] interface broadcasterrorcallback { void onerror broadcasterror data ; }; methods onerror this method is the callback parameter void onerror broadcasterror data ; privilege level partner privilege http //developer samsung com/privilege/broadcast parameters data provide status since 6 5 code example var onsuccess = function val { console log "[setcurrentaudio] success " + val result ; }; var onerror = function error { console log "[setcurrentaudio] code " + error code + " error name " + error name + " message " + error message ; }; console log "[setcurrentaudio]" ; webapis broadcast setcurrentaudio 0, onsuccess, onerror ; 3 full webidl module broadcast { enum eaudiotype { "invalid", "undefined", "clean_effect", "hearing_impaired", "visual_impaired" }; enum echanneltype { "atv", "dtv", "catv", "cdtv", "sdtv" }; enum ebroadcaststandard { "atsc", "dvb", "isdb" }; enum epolarisationtype { "unknown", "pol_hl", "pol_vr" }; enum ehotelprogramtype { "normal", "protected", "info", "radio", "delete" }; enum esubtitlemode { "normal", "hearing_impaired" }; enum ecolorsystem { "auto", "pal", "secam", "ntsc4_43", "ntsc3_58", "pal_m", "pal_n" }; enum esatelliteid { "astra_19_2e", "astra_23_5e", "astra_28_2e", "astra_31_5e", "astra_4_8e", "eutelsat_10e", "eutelsat_16e", "eutelsat_21_5e", "eutelsat_25_5e", "eutelsat_28_5e", "eutelsat_33e", "eutelsat_36e", "eutelsat_3e", "eutelsat_70_5e", "eutelsat_70e", "eutelsat_7e", "eutelsat_8_west_c", "eutelsat_9e", "eutelsat12_westa", "eutelsat5_westa", "eutelsat7_westa", "eutelsat8_westa", "eutelsatw1_10e", "eutelsatw2_16e", "eutelsatw3a_7e", "eutelsatw4_w7_36e", "eutelsatw5_70_5e", "eutelsatw6_21_5e", "abs_2_75e", "abs_7", "afghansat_1", "amazonas_61w", "amos_4w", "apstar", "arabsat_30_5e", "arabsat_5c_20e", "asiasat_5", "asiasat_7", "atlanticbird_5w", "atlanticbird1_12_5w", "atlanticbird2_8w", "azerspace_1_africasat_1a", "badr_26e", "bonum1_56e", "eurobird_25_5e", "eurobird_28_5e", "eurobird_33e", "eurobird_4e", "eurobird_9e", "express_am22", "express_am44", "express_am5_140e", "express_at1_56e", "expressa4_14w", "expressam1_40e", "hellas_39e", "hispasat_30w", "hotbird_13e", "insat_4b_93_3e", "intelsat_10", "intelsat_45e", "intelsat_902", "intelsat_904_60e", "intelsat15_85_2e", "intelsat1r_45w", "intelsat3r_43w", "intelsat7_10_68_5e", "intelsat705_50w", "intelsat707_53w", "intelsat801_31_5w", "intelsat805_55_5w", "intelsat9_58w", "intelsat901_18w", "intelsat903_34_5w", "intelsat905_24_5w", "intelsat907_27_5w", "measat_3b_91_5e", "nilesat_102_7w", "nilesat_201_7w", "nilesat_7w", "nss_6_ses_8_95e", "nss12_57e", "nss7_22w", "nss806_40_5w", "optus_d1_160e", "paksat_38e", "ses_5", "ses_7_108_2e", "sesat_53e", "st_2", "telstar_11n_37_5w", "telstar12_15w", "thaicom", "thor_intelsat_0_8w", "turksat_31_3e", "turksat_42e", "yahsat_1a", "yamal_202", "yamal201_90e", "user1", "user2", "user3", "user4" }; dictionary broadcastresult { domstring result; domstring data; }; dictionary broadcasterror { long code; domstring name; domstring message; }; [nointerfaceobject] interface broadcastmanagerobject { readonly attribute broadcastmanager broadcast; }; webapis implements broadcastmanagerobject; [nointerfaceobject] interface audioinfo { readonly attribute domstring language; readonly attribute long index; readonly attribute eaudiotype type; }; [nointerfaceobject] interface directtuneoption { readonly attribute ebroadcaststandard broadcaststandard; readonly attribute echanneltype channeltype; readonly attribute long major; readonly attribute long minor; readonly attribute long frequency; readonly attribute emodulationtype modulationtype; readonly attribute long ptc; readonly attribute long symbolrate; readonly attribute ebandwidth bandwidth; readonly attribute long programnumber; readonly attribute ecolorsystem? colorsystem; readonly attribute esatelliteid? satelliteid; readonly attribute epolarisationtype? polarization; readonly attribute domstring? channelname; readonly attribute ehotelprogramtype? hotelprogramtype; }; [nointerfaceobject] interface subtitleinfo { readonly attribute domstring language; readonly attribute long index; readonly attribute esubtitlemode mode; }; [nointerfaceobject] interface broadcastmanager { domstring getversion ; void enabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void disabledataservice broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; audioinfo [] gettotalaudioinfo ; audioinfo getcurrentaudioinfo ; void setcurrentaudio long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; subtitleinfo [] gettotalsubtitleinfo ; subtitleinfo getcurrentsubtitle ; void setcurrentsubtitleindex long index, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void sethoteldrmforensicdata domstring forensicdata, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void tunedirect directtuneoption tuneoption, broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; void clearrating broadcastsuccesscallback onsuccess, optional broadcasterrorcallback? onerror ; }; [callback = functiononly, nointerfaceobject] interface broadcastsuccesscallback { void onsuccess broadcastresult data ; }; [callback = functiononly, nointerfaceobject] interface broadcasterrorcallback { void onerror broadcasterror data ; }; };